﻿#if($msg)
<script>
alert('$!msg');
</script>
#end
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>站点列表</title>
<link href="/include/manage/images/main/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="/include/manage/js/jquery.js"></script>
<script type="text/javascript" src="/include/manage/datepicker/WdatePicker.js"></script>
<script language="javascript">
function searchNums(){
	jQuery('#searchform').submit();
}

function checkAll() {
	if($('#selAll').attr("checked")){
		$('input[type=checkbox]').attr('checked', $('#selAll').attr("checked"));
	}else{
		$('input[type=checkbox]').removeAttr("checked");
	}
}

function delSel(){
	if(confirm('请注意：删除站点后，站点下的频道和文章都将被删除，确定要删除吗?')){
		var str='';
		$("input[name='sel_id']:checked").each(function(){
			str+=$(this).val()+",";
		});
		$('#deleteid').val(str);
		$('#delform').submit();
	}
}
</script>
</head>
<body>
<form id="delform" name="delform" action="/manage_site.ad" method="post">
	<input type="hidden" name="parameter" value="delete" />
	<input type="hidden" id="deleteid" name="id" value="" />
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30" background="/include/manage/images/main/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="30"><img src="/include/manage/images/main/tab_03.gif" width="12" height="30" /></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="46%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><div align="center"><img src="/include/manage/images/main/tb.gif" width="16" height="16" /></div></td>
                <td width="95%"><span class="STYLE3">当前位置</span>：[内容管理]-[站点管理]</td>
              </tr>
            </table></td>
            <td width="54%"><table border="0" align="right" cellpadding="0" cellspacing="0">
              <tr>
                <td width="60"><table width="90%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><a href="/manage_site.ad?parameter=add"><img src="/include/manage/images/main/22.gif" width="14" height="14" /></a></div></td>
                    <td><div align="center"><a href="/manage_site.ad?parameter=add">添加</a></div></td>
                  </tr>
                </table></td>
                <td width="60"><table width="90%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><a href="javascript:delSel()"><img src="/include/manage/images/main/11.gif" width="14" height="14" /></a></div></td>
                    <td><div align="center"><a href="javascript:delSel()">删除</a></div></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="16"><img src="/include/manage/images/main/tab_07.gif" width="16" height="30" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="/include/manage/images/main/tab_12.gif">&nbsp;</td>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#b5d6e6">
		<tr>
      <td width="24" height="22" background="/include/manage/images/main/bg.gif"><div align="center">
              <input type="checkbox" name="selAll" id="selAll" onClick="checkAll()" />
      </div></td>
			<td width="100" height="22" background="/include/manage/images/main/bg.gif"><div align="center">站点名称</div></td>
			<td width="*" background="/include/manage/images/main/bg.gif"><div align="center">站点域名</div></td>
			<td width="150" background="/include/manage/images/main/bg.gif"><div align="center">发布目录</div></td>
			<td width="150" background="/include/manage/images/main/bg.gif"><div align="center">操作</div></td>
		</tr>
  #foreach ($site in $siteList)
  <tr>
    <td height="20" bgcolor="#FFFFFF"><div align="center">
    	<input type="checkbox" name="sel_id" value="$!site.id" />
    </div></td>
    <td height="20" bgcolor="#FFFFFF">
				<a href="/manage_site.ad?parameter=edit&id=$!site.id">$!site.name</a>
		</td>
		<td bgcolor="#FFFFFF">$!site.domain</td>
		<td bgcolor="#FFFFFF">$!site.pub_dir</td>
		<td bgcolor="#FFFFFF">
			<a href="/manage_site.ad?parameter=edit&id=$!site.id">编辑</a> | 
			<a href="/manage_site.ad?parameter=delete&id=$!site.id">删除</a> | 
			<a href="/index.do?parameter=preview&sid=$!site.id" target="_blank">预览</a>
		</td>
  </tr>
  #end
        </table></td>
        <td width="8" background="/include/manage/images/main/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="35" background="/include/manage/images/main/tab_19.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="35"><img src="/include/manage/images/main/tab_18.gif" width="12" height="35" /></td>
        <td>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="STYLE4">&nbsp;&nbsp;共有 $!rows 个站点，当前第 $!currentPage/$!totalPage 页</td>
            <td><table border="0" align="right" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="40"><a href="/manage_type.ad?parameter=page&page=1&tree_id=$!tree_id"><img src="/include/manage/images/main/first.gif" width="37" height="15" /></a></td>
                  <td width="45">#if($frontPage<1)<img src="/include/manage/images/main/back-no.gif" width="43" height="15" />#else<a href="/manage_type.ad?parameter=page&page=$!frontPage&tree_id=$!tree_id"><img src="/include/manage/images/main/back.gif" width="43" height="15" /></a>#end</td>
                  <td width="45">#if($nextPage>$totalPage)<img src="/include/manage/images/main/next-no.gif" width="43" height="15" />#else<a href="/manage_type.ad?parameter=page&page=$!nextPage&tree_id=$!tree_id"><img src="/include/manage/images/main/next.gif" width="43" height="15" /></a>#end</td>
                  <td width="40"><a href="/manage_type.ad?parameter=page&page=$!totalPage&tree_id=$!tree_id"><img src="/include/manage/images/main/last.gif" width="37" height="15" /></a></td>
                  <td width="100"><div align="center"><span>转到第
                    <input id="goPage" name="goPage" type="text" size="4" style="height:16px; width:20px; border:1px solid #999999;" /> 
                    页 </span></div></td>
                  <td width="40"><a href="javascript:location.href='/manage_type.ad?parameter=page&tree_id=$!tree_id&page='+document.getElementById('goPage').value"><img src="/include/manage/images/main/go.gif" width="37" height="15" /></a></td>
                </tr>
            </table></td>
          </tr>
        </table>
				</td>
        <td width="16"><img src="/include/manage/images/main/tab_20.gif" width="16" height="35" /></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>